﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">


    <!--SHARED-->

    <SolidColorBrush x:Key="selectBrush" Color="White"/>

    <SolidColorBrush x:Key="sliderBrush">
        <SolidColorBrush.Color>
            <Color A="255" R="217" G="227" B="239"/>
        </SolidColorBrush.Color>
    </SolidColorBrush>

    <LinearGradientBrush x:Key="fillBrush" StartPoint="0,0" EndPoint="0,1">
        <GradientStop Offset="0" >
            <GradientStop.Color>
                <Color A="255" R="0" G="84" B="154"/>
            </GradientStop.Color>
        </GradientStop>
        <GradientStop Offset="1" >
            <GradientStop.Color>
                <Color A="255" R="2" G="24" B="84"/>
            </GradientStop.Color>
        </GradientStop>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="menuBorderBrush" StartPoint="0,0" EndPoint="0,1" Opacity="0.5">
        <GradientStop Offset="0" >
            <GradientStop.Color>
                <Color A="255" R="0" G="84" B="154"/>
            </GradientStop.Color>
        </GradientStop>
        <GradientStop Offset="1" >
            <GradientStop.Color>
                <Color A="255" R="2" G="24" B="84"/>
            </GradientStop.Color>
        </GradientStop>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="volumeSliderBrush" StartPoint="0,0" EndPoint="1,0">
        <GradientStop Offset="0" >
            <GradientStop.Color>
                <Color A="0" R="255" G="255" B="255"/>
            </GradientStop.Color>
        </GradientStop>
        <GradientStop Offset="1" >
            <GradientStop.Color>
                <Color A="255" R="2" G="24" B="84"/>
            </GradientStop.Color>
        </GradientStop>
    </LinearGradientBrush>

    <LinearGradientBrush x:Key="volumeThumbSliderBrush2" StartPoint="0,0" EndPoint="1,0">
        <GradientStop Offset="0.4" >
            <GradientStop.Color>
                <Color A="255" R="156" G="172" B="182"/>
            </GradientStop.Color>
        </GradientStop>
        <GradientStop Offset="1" >
            <GradientStop.Color>
                <Color A="255" R="2" G="24" B="84"/>
            </GradientStop.Color>
        </GradientStop>
    </LinearGradientBrush>

    <RadialGradientBrush GradientOrigin="-0.52,0.496" x:Key="volumeThumbSliderBrush" >
        <!--<RadialGradientBrush.RelativeTransform>
            <TransformGroup>
                <ScaleTransform CenterX="0.5" 
          CenterY="0.5" ScaleX="1.5" ScaleY="1.5"/>
                <TranslateTransform X="0.3" Y="0.02"/>
            </TransformGroup>
        </RadialGradientBrush.RelativeTransform>-->
        <GradientStop Offset="0.6" >
            <GradientStop.Color>
                <Color A="255" R="156" G="172" B="182"/>
            </GradientStop.Color>
        </GradientStop>
        <GradientStop Offset="1" >
            <GradientStop.Color>
                <Color A="255" R="2" G="24" B="84"/>
            </GradientStop.Color>
        </GradientStop>
    </RadialGradientBrush>


    <!--VOLUME SLIDER-->

    <Style x:Key="SliderButtonStyle" TargetType="{x:Type RepeatButton}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="IsTabStop" Value="false"/>
        <Setter Property="Focusable" Value="false"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type RepeatButton}">
                    <Border Background="Transparent" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SliderThumbStyle" TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Height" Value="12"/>
        <Setter Property="Width" Value="12"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Ellipse 
            x:Name="Ellipse" 
            Fill="{StaticResource volumeThumbSliderBrush}"            
            StrokeThickness="1"
                        Stroke="{StaticResource fillBrush}"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Cursor" Value="Hand"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="Ellipse" Property="Fill" Value="Yellow"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="VolumeSlider" TargetType="{x:Type Slider}">
        <Grid>
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TickBar 
        x:Name="TopTick"
        SnapsToDevicePixels="True" 
        Placement="Top"
        Fill="{StaticResource volumeSliderBrush}"
        Height="0"
        Visibility="Collapsed" />
            <Border 
        x:Name="TrackBackground"
        Margin="0"
        CornerRadius="0" 
        Height="5"
        Grid.Row="1"
        Background="Transparent" 
        BorderBrush="{StaticResource fillBrush}"
        BorderThickness="0" >
                <Polygon Points="0,0 30,-5 30,5" Fill="Transparent" StrokeThickness="1" Stroke="{StaticResource fillBrush}"
        HorizontalAlignment="Center" VerticalAlignment="Center" Stretch="Fill" Margin="4,0,0,0"/>
            </Border>
            <Track Grid.Row="1" x:Name="PART_Track">
                <Track.DecreaseRepeatButton>
                    <RepeatButton 
            Style="{StaticResource SliderButtonStyle}"
            Command="Slider.DecreaseLarge" />
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb Style="{StaticResource SliderThumbStyle}" />
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton 
            Style="{StaticResource SliderButtonStyle}"
            Command="Slider.IncreaseLarge" />
                </Track.IncreaseRepeatButton>
            </Track>
            <TickBar 
        x:Name="BottomTick"
        SnapsToDevicePixels="True" 
        Grid.Row="2"
        Fill="{TemplateBinding Foreground}"
        Placement="Bottom"
        Height="4"
        Visibility="Collapsed" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="TickPlacement" Value="TopLeft">
                <Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="TickPlacement" Value="BottomRight">
                <Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="TickPlacement" Value="Both">
                <Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
                <Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Cursor" Value="Hand"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>

    <!--TRACK SLIDER-->

    <Style x:Key="SliderThumbStyle2" TargetType="{x:Type Thumb}">
        <Setter Property="SnapsToDevicePixels" Value="true"/>
        <Setter Property="OverridesDefaultStyle" Value="true"/>
        <Setter Property="Height" Value="6"/>
        <Setter Property="Width" Value="8"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Thumb}">
                    <Rectangle 
            x:Name="rectangle" 
            Fill="{StaticResource fillBrush}"            
            StrokeThickness="0"/>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter Property="Cursor" Value="Hand"/>
                        </Trigger>
                        <Trigger Property="IsEnabled" Value="false">
                            <Setter TargetName="rectangle" Property="Fill" Value="Yellow"/>
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <ControlTemplate x:Key="TrackSlider" TargetType="{x:Type Slider}">
        <Grid x:Name="grid">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto" MinHeight="{TemplateBinding MinHeight}"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TickBar 
        x:Name="TopTick"
        SnapsToDevicePixels="True" 
        Placement="Top"
        Fill="{StaticResource volumeSliderBrush}"
        Height="0"
        Visibility="Collapsed" />
            <Border 
        x:Name="TrackBackground"
        Margin="0"
        CornerRadius="0" 
        Height="5"
        Grid.Row="1"
        Background="{StaticResource sliderBrush}" 
        BorderBrush="White"
        BorderThickness="0" >
                <Rectangle x:Name="playedPart" HorizontalAlignment="Left" Fill="White" Height="{Binding ActualHeight, ElementName=TrackBackground, Mode=Default}" Width="{Binding ActualWidth, ElementName=repeatButton1, Mode=Default}"/>
            </Border>
            <Track Grid.Row="1" x:Name="PART_Track">
                <Track.DecreaseRepeatButton>
                    <RepeatButton x:Name="repeatButton1" 
            Style="{StaticResource SliderButtonStyle}"
            Command="Slider.DecreaseLarge" />
                </Track.DecreaseRepeatButton>
                <Track.Thumb>
                    <Thumb Style="{StaticResource SliderThumbStyle2}" />
                </Track.Thumb>
                <Track.IncreaseRepeatButton>
                    <RepeatButton x:Name="repeatButton" 
            Style="{StaticResource SliderButtonStyle}"
            Command="Slider.IncreaseLarge" />
                </Track.IncreaseRepeatButton>
            </Track>
            <TickBar 
        x:Name="BottomTick"
        SnapsToDevicePixels="True" 
        Grid.Row="2"
        Fill="{TemplateBinding Foreground}"
        Placement="Bottom"
        Height="4"
        Visibility="Collapsed" />
        </Grid>
        <ControlTemplate.Triggers>
            <Trigger Property="TickPlacement" Value="TopLeft">
                <Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="TickPlacement" Value="BottomRight">
                <Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="TickPlacement" Value="Both">
                <Setter TargetName="TopTick" Property="Visibility" Value="Visible"/>
                <Setter TargetName="BottomTick" Property="Visibility" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="True">
                <Setter Property="Cursor" Value="Hand"/>
            </Trigger>
        </ControlTemplate.Triggers>
    </ControlTemplate>


    <!--BUTTON-->

    <Path Data="M 0,8 Q 4,25 20,0" StrokeThickness="1" Stroke="{StaticResource fillBrush}" x:Key="saveSign" Stretch= "Uniform" x:Shared="false"/>

    <Polygon Points="0,0 0,25 20,12" Fill="{StaticResource fillBrush}" StrokeThickness="0.5"
        HorizontalAlignment="Center" VerticalAlignment="Center" Stretch= "Uniform" x:Key="playSign" x:Shared="False"/>

    <Path x:Key="toolSign" Canvas.Left="335.333" Canvas.Top="231.444" Stretch="Uniform" StrokeThickness="1" StrokeLineJoin="Round" Fill="{StaticResource fillBrush}" Data="F1 M 344.444,137.778L 274.222,190.222L 269.778,260.444L 338.222,274.667L 413.778,221.333L 413.778,279.111L 310.667,354.667L 242.222,337.778L 153.333,395.556L 108,328.889L 200.444,267.556L 209.333,168L 278.667,119.111L 344.444,137.778 Z "/>

    <Polygon x:Key="nextSign" Points="0,0 0,25 17,12 17,25 20,25 20,0 17,0 17,12" Fill="{StaticResource fillBrush}" StrokeThickness="1" HorizontalAlignment="Center" VerticalAlignment="Center" Stretch= "Uniform"/>

    <Polygon  Points="0,0 0,25 20,25 20,0" StrokeThickness="0.5" Fill="{StaticResource fillBrush}"
        HorizontalAlignment="Center" VerticalAlignment="Center" Stretch= "Uniform" x:Key="stopSign" x:Shared="False"/>

    <Polygon  x:Key="previousSign" Points="20,0 20,25 3,12 3,25 0,25 0,0 3,0 3,12" Fill="{StaticResource fillBrush}" StrokeThickness="0.5"
        HorizontalAlignment="Center" VerticalAlignment="Center" Stretch= "Uniform"/>

    <Path Stroke="Black" StrokeThickness="0" Fill="{StaticResource fillBrush}" x:Key="openSign" HorizontalAlignment="Center" VerticalAlignment="Center" >
        <Path.Data>
            <GeometryGroup FillRule="EvenOdd">
                <RectangleGeometry Rect="0,0 2 2"/>
                <RectangleGeometry Rect="2,1 7 1"/>
                <RectangleGeometry Rect="8,2 1 6"/>
                <RectangleGeometry Rect="0,0 10 10"/>
            </GeometryGroup>
        </Path.Data>
    </Path>

    <Image x:Key="pauseSign" x:Shared="False">
        <Image.Source>
            <DrawingImage>
                <DrawingImage.Drawing>
                    <DrawingGroup>

                        <GeometryDrawing Brush="{StaticResource fillBrush}">
                            <GeometryDrawing.Geometry>
                                <RectangleGeometry Rect="0,0,7,25" RadiusX="0"  RadiusY="0"/>
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>

                        <GeometryDrawing Brush="{StaticResource fillBrush}">
                            <GeometryDrawing.Geometry>
                                <RectangleGeometry Rect="13,0,7,25" RadiusX="0"  RadiusY="0"/>
                            </GeometryDrawing.Geometry>
                        </GeometryDrawing>

                    </DrawingGroup>
                </DrawingImage.Drawing>
            </DrawingImage>
        </Image.Source>
    </Image>

    <Path Stroke="Black" StrokeThickness="0" Fill="{StaticResource fillBrush}" x:Key="snapshotSign" HorizontalAlignment="Center" VerticalAlignment="Center" >
        <Path.Data>
            <GeometryGroup FillRule="EvenOdd">
                <RectangleGeometry Rect="0,0 4 10"/>
                <PathGeometry Figures="M4,3 L7,0 L7,10 L4,7"/>
                <RectangleGeometry Rect="8,1 1 1"/>
                <RectangleGeometry Rect="9,0 1 1"/>
                <RectangleGeometry Rect="8,3 2 1"/>
                <RectangleGeometry Rect="8,6 2 1"/>
                <RectangleGeometry Rect="8,8 1 1"/>
                <RectangleGeometry Rect="9,9 1 1"/>
            </GeometryGroup>
        </Path.Data>
    </Path>

    <Style x:Key="smartButton" TargetType="{x:Type Button}">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type Button}">
                    <Grid>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="10*" />
                            <RowDefinition Height="10*" />
                            <RowDefinition Height="10*" />
                        </Grid.RowDefinitions>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="10*" />
                            <ColumnDefinition Width="10*" />
                            <ColumnDefinition Width="10*" />
                        </Grid.ColumnDefinitions>
                        <Rectangle x:Name="buttonRect" Grid.ColumnSpan="3" Grid.RowSpan="3" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" RadiusX="10" RadiusY="10" StrokeThickness="1" Stroke="{StaticResource fillBrush}"/>
                        <ContentPresenter Grid.Column="1" Grid.Row="1" x:Name="buttonContent" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" HorizontalAlignment="Center" Margin="0,0,0,0" VerticalAlignment="Center" RecognizesAccessKey="True"/>
                    </Grid>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="buttonRect" Property="Fill" Value="{StaticResource selectBrush}"/>
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter Property="RenderTransform" TargetName="buttonContent">
                                <Setter.Value>
                                    <TranslateTransform X="1" Y="1"/>
                                </Setter.Value>
                            </Setter>
                            <!--<Setter TargetName="buttonRect" Property="Fill" Value="Transparent"/>-->
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>